package com.ruoyi.organization.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.TreeEntity;

import java.util.List;

/**
 * 机构信息对象 wdmf_organization
 * 
 * @author ruoyi
 * @date 2025-06-11
 */
@Data
public class Organization extends TreeEntity
{
    private static final long serialVersionUID = 1L;

    /** 机构ID */
    private Long organizationId;

    /** 父级ID */
    private Long parentId;

    /** 子级组织 */
    private List<Organization> childrenCode;

    /** 机构层级 */
    @Excel(name = "机构层级")
    private Long level;

    /** 机构名称 */
    @Excel(name = "机构名称")
    private String orgName;

    /** 状态（0正常 1禁用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=禁用")
    private String status;

    /** 删除标志（0存在 2删除） */
    private String delFlag;

    /** 版本号（乐观锁） */
    private Long version;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("organizationId", getOrganizationId())
            .append("parentId", getParentId())
            .append("level", getLevel())
            .append("orgName", getOrgName())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
